Repository navigation
docs: notify people, groups and Slack channels about scheduled task runs (CUB-5670) - #12266
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
Claude finished @mngr's task in 1m 21s —— View job Small fixes needed: 1 medium, 2 low. One example contradicts the page, and the API reference won't show the new Review details
FindingsMedium: Low: Low: the generated API reference is still on the old model (not inline). Checked and fine
Review threadsThe listing returned 0 of my own threads, so there was nothing to resolve or re-affirm. Both inline findings were posted as new threads. |
|
Claude finished @mngr's task in 1m 11s —— View job Review: no blockers. Found 1 medium and 3 low issues (all in Details
Findings (posted inline)
Checked, no issues
Not verifiedI couldn't check the labels, caps (1,000 / 200 / 50) or recipient rules against the code: it lives in Review threadsThe thread listing returned 0 of my own threads, so I resolved none and re-affirmed none. |
|
Claude finished @mngr's task in 1m 25s —— View job Review of PR #12266: 2 medium, 1 low. The docs match the code the PR description cites. The issues are that the page contradicts itself in one place and that the linked API reference is out of date. Details
FindingsMedium
Low (not posted inline)
Checked and fine
Review threadsThe listing returned 0 of my own threads: no prior threads, so none were resolved or re-affirmed. |
|
Claude finished @mngr's task in 1m 4s —— View job Review: 0 high, 1 medium, 2 low. Details
Medium
Low (not posted inline)
Checked, no issue
Review threadsThe listing returned 0 of my own threads, so I resolved none and re-affirmed none. |
|
Claude finished @mngr's task in 44s —— View job No issues found: 0 high, 0 medium, 0 low. Review details
What I checked
Review threadsNo prior threads: the listing returned 0 of my own unresolved threads. I resolved 0 and re-affirmed 0. |
|
Claude finished @mngr's task in 44s —— View job No issues found in this round: 0 high, 0 medium, 0 low. Review details
ScopeThis push adds one commit, I re-read both changed files in full, not just the diff:
I couldn't check the agent's channel behaviour against Review threadsThe listing returned 0 unresolved threads of mine, so there was nothing to resolve or re-affirm. |
… the run thread contradicts (CUB-5670)
…tification (CUB-5670)
…eps disabled (CUB-5670)
|
Claude finished @mngr's task in 49s —— View job No new findings: 0 high, 0 medium, 0 low. Ready to merge once its dependencies have merged. Review details
ScopeThis round reviewed the docs-only diff in Checks
Review threadsThe listing returned 0 of my own unresolved threads, so this round resolved none and re-affirmed none. |
…99) (#12362) Depends on cubedevinc/cubejs-enterprise#16918. **Do not merge before it.** Based on `master`, squashed and rebased on top of the merged #12266 (CUB-5670, recipients and channels) and #12306 (CUB-5218). Those PRs' text on this page is the base; this PR only moves their "task dialog" wording onto the task page's **Settings**. ## Summary The task dialog is gone. A scheduled task is now edited on its own page, which has three parts: run history on the left, the task's **Settings** in the middle, and the agent chat on the right. The agent changes the task while it is on screen. Changes to `docs/explore-analyze/scheduled-tasks.mdx`: - **List:** a click on a row opens the task's page, and rows show no button on hover. **New task** is now a single button instead of the *Create with agent* / *Set up manually* dropdown. It opens a **New scheduled task** page and posts the set-up message to the chat for you. If the agent creates the task, its chat stays open on the new task's page. If you press **Create** by hand, the task's page opens beside a new, empty chat, and the set-up conversation stays in the chat's history. **Edit** is gone from the row actions, and the toggle no longer disables an Edit while it saves. - **Task detail page:** - The header has Share, Delete, Check now and Run now, and no pencil. On a narrow window the labelled buttons show only their icons. On a conditional task, hovering **Run now** says it runs the agent without checking the condition. - The page describes the three-part layout; on a narrow window the history sits above the settings. - The left column shows the description and the status tag, then **Condition** (on a conditional task) **above History**. The Instructions, Repeats and Notifies blocks are gone, because the Settings panel shows all three. - Two new subsections: *Changing a task's settings* (Update is enabled only after a change and saves only the changed settings; name and instructions are required; an incomplete condition keeps Update disabled) and *Changing a task with the agent* (the task chip beside the agent picker, the in-place change, unsaved edits kept, and Hide chat / Show chat). - **"Task dialog" wording moved to the task's Settings**, in the Conditional tasks section and in *Notifying people when a run finishes*: - Create/Update stays disabled until a conditional task notifies someone. - The panel offers to connect Slack and says when nobody is notified. - It marks a recipient **Not shared: won't be notified**. - Channels belong to the whole task. - **Managing tasks from chat:** the agent can report a task's agent and pick one, or set it back to Deployment default; on a deployment with more than 50 agents it sees only 50 of them, says so, and leaves any other to the task's Settings. The pencil in the chat's side panel opens the task's page with that chat beside it. The *Create with agent* reference is removed; master's data-alerts sentence is kept. - **A sentence already wrong on master, corrected:** a view-only task's tag reads **View only** (`share.viewOnly`), not "Shared with you". Its settings have no **Update** and none of them can be edited. The public API's chat-history `initialContext` enum gains `scheduled-task`. `api-reference/api.yaml` and `changelog.mdx` are synced from platform-client releases, so that value arrives with the next sync and is not edited by hand here. ## What I verified against the code Checked against the feature branch at its current head `8da0e9880a`, and the newest hand-off walk on staging-mngr-11 (`handoff-walk-r4.log`, deployment 2015, run on 28 Oct). Of the three commits added since this page was first written, `4e0537c8df` (react-router 7.18 typing) and `87ef869334` (`ACCEPTS_ALIAS_MEMBERS` for the task chat) change nothing this page describes; `8da0e9880a` caps the agents `listScheduledTasks` returns, which the *Managing tasks from chat* section now says: - **List:** `ScheduledTasksPage.tsx` keeps master's `onRowClick` and adds no name-cell control. Walk step 10: with the pointer on the row, `ScheduledTaskOpen*` matches 0 elements on the page. The ⋮ menu reads Run now / Check now / Delete, with no Edit, and a click on the name opens `/scheduled-tasks/<id>`. - **New task:** it is a `Button to=".../scheduled-tasks/new"`. Walk step 1: no menu opens, Name and Instructions are empty, and the set-up message is posted with no typing. `ScheduledTaskSideChat` sends `page.createWithAgentPrompt` only when `hasAccess('scheduled-task')` is true and no chat is open, hence "if you can use Analytics Chat". - A hand-made Create calls `openCreatedTask(id, false)`. That drops `chatId` and does not reopen the set-up chat. Walk step 2: "Scheduled task created" shows, the URL is `/scheduled-tasks/9652` with `chatId` null, the transcript has 0 messages, and the chat's History control lists the set-up chat. - An agent create goes through `ScheduledTaskPageChatContext.onTaskCreated`, which is `openCreatedTask(id, true)` and keeps the chat. - **Header:** `ScheduledTaskActions` renders Share (only when `canManage`), Delete, Check now (conditional task) and Run now. `isCompact` makes them icon-only, named by `aria-label` and tooltip. `ScheduledTaskChatToggle` is always an icon, labelled Show chat / Hide chat. - Walk step 9 at 800 px and 390 px: all five are 32×32 icons inside the viewport, and Run now's tooltip reads "Runs the agent now without checking the condition.". - A press at the chat button's centre opens the chat. - **Layout (`ScheduledTaskDetailPage.tsx`):** the history column shows the description and the status tag, then `ScheduledTaskActivity`, which renders `ScheduledTaskCondition` before `ScheduledTaskRunHistory`. On `@mobile` the grid is one column. - Walk step 2 at 1600 px: history | settings | chat side by side. - Walk step 6: the condition block's bottom (369) sits above the run history's top (393). - Walk step 9: the history column sits above the settings at 800 and 390 px. - **Settings (`ScheduledTaskSettings.tsx`):** `changedFields` sends only the changed settings. Update is disabled when nothing has changed, the condition has a problem, or a condition notifies nobody; its tooltip in that last case is `conditionNeedsNotification`. Name and instructions are `required`. - `ScheduledTaskNotifyFields` is part of the panel, with the Slack connect prompt, `notifyNoChannelHint` and `notifyRecipientNotShared`. - A new task's notification is the current user plus Inbox when the inbox is on. - View-only (`canManage === false`): the form is `isDisabled` with no Submit, and the header shows the `ScheduledTaskViewOnly` tag in place of the actions. - Walk step 3: "Scheduled task updated" shows, and Update is disabled again. - **Chip (`AttachmentPreview.tsx`):** walk step 4 reads the whole 59-character name in the chip, cut by width, and whole in the hover tooltip. Walk step 8 drags the chat to its 300 px minimum: the chip is 28×28 with 0 px of the name painted, and hovering the icon shows the whole name. - **Agent edit:** walk step 5 sends "Run it every day at 8:00 instead.". The panel reads "Every day at 8:00 AM" with no reload, the cron is `0 8 * * *`, there is still one task, and the write is `updateScheduledTask`. Walk step 6 adds a condition from chat the same way. - **Agent picking:** `agentId` is on `UpdateScheduledTaskToolFactory` and on create (omitted means the chat's agent, null means the deployment default). - **Agent list cap:** `ListScheduledTasksToolFactory.ts` slices the agents to `MAX_LISTED_TASK_AGENTS` (50) and adds `agentsHasMore` and an `agentsNote` telling the model to say the list is cut and ask the user to pick an unlisted agent in the task's settings. The Settings picker (`useTaskAgents`) lists every allowed agent, with no cap. - **Sidebar pencil:** `ScheduledTaskSidebarDetail` passes `editHref` = the task page plus `?chatId=<current chat>`. Feature PR: cubedevinc/cubejs-enterprise#16918 (cubedevinc/cubejs-enterprise#16918) Linear: https://linear.app/cube-d3/issue/CUB-5599/make-scheduled-tasks-editable-via-ai-chat --------- Co-authored-by: Gleb <gleb@Glebs-MacBook-Air-2.local>
Depends on cubedevinc/cubejs-enterprise#16532 (and its base cubedevinc/cubejs-enterprise#16531): do not merge before them. Also merge it together with, or after, the cube-js/cube API reference sync for the first
@cube-dev/platform-clientrelease that carriesnotification(cubedevinc/cubejs-enterprise#16532 adds the field and rewrites theconditiondescriptions inpackages/platform-client/src/schema.ts): until that sync,docs-mintlify/api-reference/api.yamlhas nonotificationfield and still says the creator gets an inbox row only withnotificationEnabled: true, which this page's Platform API section contradicts.Summary
A scheduled task now notifies chosen people, user groups and Slack channels, by Inbox, Email and Slack together, instead of only its creator in the inbox. Rebased on master after #12283 (CUB-5559: list columns, Next run, Last check), #12307 (the Manage all scheduled tasks permission), #12309 (the task's Agent) and #12368 (data-model access in scheduled runs, a section this PR does not touch); their merged wording is the base. This PR updates:
docs-mintlify/docs/explore-analyze/scheduled-tasks.mdxnotification(a request without that field is saved, as before).notificationfield.notificationfield and its caps;notificationEnableddeprecated.docs-mintlify/docs/inbox.mdx: the Scheduled task run row's "Who gets it", the figures shown only in the creator's notification, email/Slack from a task, and the anchor rename.Verified against the code (feature branch HEAD
e22eb3290b)packages/console-ui/src/i18n/locales/en-US/scheduledTasks.json:notifyLabel"Notify",notifyRecipientsLabel"People and groups",notifyChannelsLabel"Send by",notifyRecipientNotShared"Not shared: won't be notified",notifySlackChannelsDescription"Slack posts once to each channel. Inbox and Email go to the people above.",summary.notifiesNobody"Nobody is notified",detail.notifies"Notifies".useNotificationSummary(task-notification.ts;ScheduledTaskListCells.tsx,ScheduledTaskInstructions.tsx); Inbox drops out of it when the workspace's inbox is off (deliveredNotification). The hand-off walk on staging-mngr-7 read "Inbox, Email · 4 people, 1 group" and "Inbox · 3 people, 1 group".taskOutcome(check, notifiesAnyone)).ScheduledTaskService.assertConditionNotifiesholds a save only when it sendsnotification(sendsNotification) or the agent's update asks for it; the agent's create tool always sendsnotification(CreateScheduledTaskToolFactory.ts:112).AiEngineerController.notifyScheduledTaskRecipientsexpands groups at send time, de-duplicates, keeps only the creator on a failed run, and skips any non-creator for whomAiEngineerService.canViewScheduledTask(a ScheduledTask read grant or admin, plus deployment read) is false; Inbox is sent only with the tenant'suseNotificationInboxon.NOTIFICATION_CAPS = { userIds: 1000, groupIds: 200, slackChannels: 50 }(packages/ai-engineer/src/dto/scheduled-task.ts:290).ScheduledTaskService.grantRecipientSharesruns on every create and update (the dialog, the agent'screateTask/updateTasktools and the REST controller all call the service), sharing only recipients the save ADDS and only if not already shared, so a share revoked in the Share dialog is not restored by a later save. The "Not shared" mark for a user isrecipientUserIdsWithoutAccess, console-server'sfindUsersWithoutScheduledTaskAccess=canViewScheduledTask(task read grant or admin, AND deployment read), so a shared user who cannot read the deployment is marked too (PLAN AC-7d); a group is marked when it has no group grant and no organisation grant.NOTIFY_ARGUMENTS_DESCRIPTION(packages/ai-engineer/src/services/langgraph/tools/scheduled-task-recipients.ts:29, "for the whole task") and the update tool'schannelsChangednote (channelChangeNote, same file, "Channels are shared by everyone this task notifies … Tell the user."). The r3 hand-off walk on staging-mngr-7 asked the agent to also notify a second person in the inbox on an Email-only task: the stored channels became Inbox + Email for both, and the agent's reply said so.7e097cebb6Slack picker error handling,1257d35839a failed task email answers 503) change nothing the pages describe.dialog.submitCreate"Create" on a new task anddialog.submitUpdate"Update" when editing (ScheduledTaskDialog.tsx:203); the r4 hand-off walk on staging-mngr-7 read "Create disabled" with the red line and Create's tooltipconditionNeedsNotification. The page used to call it Save; it now names both.8904d17d1ekeeps the dialog's 12 px field gap around the condition switch and the Notify section, which Igor flagged after the hand-off; the Slack OAuth listener refactor773666a9d9/baed62646a;50546100b7drops a removed kit prop;e149367c86a failed task email answers 503) change no behaviour the pages describe. The hand-off, re-posted for the spacing fix, says nothing else changed.notificationnotifies nobody.Feature PR: https://github.com/cubedevinc/cubejs-enterprise/pull/16532
Linear: https://linear.app/cube-d3/issue/CUB-5670/notify-other-people-about-scheduled-task-runs